/** * 
 */
package com.yufei.infoExtractor.util;

/**
 * @author zhaoyufei zhao-0244@qq.com
 *用于异常信息的处理（获取特定的异常信息以及对异常信息进行一些分析等）
 * created at 2012-8-18 上午9:04:37
 */
public class ExceptionUtil {
	public static String getExceptionDetailsMessage(Exception e){
		StringBuffer detailMessage=new StringBuffer();
		StackTraceElement[] stackTraceElements=e.getStackTrace();
		detailMessage.append("Exception Message:"+e.getMessage()+"\n");
		for(StackTraceElement stackTraceElement:stackTraceElements){
			detailMessage.append(stackTraceElement.toString()+"\n");
		}
		return detailMessage.toString();
	}

}
